package io高级流or处理流;

import java.io.*;
import java.util.AbstractList;

/**缓冲流读取文本数据*/
public class BRDemo {
    public static void main(String[] args) throws IOException {


        FileInputStream fil = new FileInputStream("./src/io高级流or处理流/jk.txt");
        InputStreamReader inputStreamReader = new InputStreamReader(fil);
        BufferedReader br = new BufferedReader(inputStreamReader);//缓冲字符流
      /**  readLine()  按行读入
       * */
        String a;
        while ((a=br.readLine())!=null){//判断是否读到末尾
            System.out.println(a);
        }
        br.close();


//        FileInputStream fil = new FileInputStream("./src/io高级流or处理流/jk.txt");
//        InputStreamReader isr = new InputStreamReader(fil);
//        BufferedReader br = new BufferedReader(isr);
//        String w;
//        while ((w=br.readLine())!=null){
//            System.out.println(w);//换行输出
// //           System.out.print(w);没换行输出
//        }
//        br.close();


    }
}
